package service;




import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.xgggh.redpack.domain.redpack.Pack;
import java.util.List;
import io.reactivex.Flowable;
import model.Rsp;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface RedPackService {

    /**
     * @title 红包列表
     * @param page
     * @param size
     * @param sort
     * @return
     */
    @POST("redpack/search")
    Flowable<Rsp<List<Pack>>> getSearchList(@Query("page") @NonNull int page
            , @Query("size") @NonNull int size
            , @Query("sort") @Nullable String sort
            , @Body @NonNull Pack pack);
    /**
     * @title 创建红包
     * @param redPack
     * @return
     */
    @POST("redpack/create")
    Flowable<Rsp<Pack>> create(@Body @NonNull Pack redPack);

}
